package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;

/**
 * Created by root on 17-9-19.
 */
@Entity
@Table(name = "m_fun_group", schema = "", catalog = "")
public class MFunGroupEntity extends IAcross
{
	private int funId;
	private int subId;
	private Integer ref;

	@Id
	@Basic
	@Column(name = "fun_id", nullable = false)
	public int getFunId()
	{
		return funId;
	}

	public void setFunId(int funId)
	{
		this.funId = funId;
	}

	@Basic
	@Column(name = "sub_id", nullable = false)
	public int getSubId()
	{
		return subId;
	}

	public void setSubId(int subId)
	{
		this.subId = subId;
	}

	@Basic
	@Column(name = "ref", nullable = true)
	public Integer getRef()
	{
		return ref;
	}

	public void setRef(Integer ref)
	{
		this.ref = ref;
	}

	@Override
	public boolean equals(Object o)
	{
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		MFunGroupEntity that = (MFunGroupEntity) o;

		if (funId != that.funId) return false;
		if (subId != that.subId) return false;
		if (ref != null ? !ref.equals(that.ref) : that.ref != null) return false;

		return true;
	}

	@Override
	public int hashCode()
	{
		int result = funId;
		result = 31 * result + subId;
		result = 31 * result + (ref != null ? ref.hashCode() : 0);
		return result;
	}
}
